Connecting to a Server
Snak comes with five predefined connection profiles to the largest IRC networks. These profiles contains information that should allow many, but not all users to use Snak with no further configuration.

The Connection Panel
The Connection panel is placed in the list window, and can be opened from the windows menu or directly with cmd-K.

The window contains tabs for the panels with the various lists in Snak, and depending on your preferences, the Users tab may not be shown, or a MP3 request list tab may be present.

From this panel you can create, edit and delete profiles, and open connections and send commands.  To open one or more connections, select the profiles in the list and press the Connect button. When an open connection is selected, the name of the button will change to Disconnect.

Depending on your choice of interface configuration, the input field may be floating instead of attached to the window as in this picture. Whatever you type will be sent to the selected connection when you press enter. 

This picture shows the connection panel with the five predefined profiles. In this example the program is connected to DALnet and EFNet simultaneously as is indicated by the green status icons. An active connection is green, an inactive is red.  When the connection is not fully connected to the server, the icon is orange.

You can select multiple items in the list, and this can be used to easily join channels on multiple networks at the same time by issuing a command that is sent to all the selected connections.

If the predefined profiles are adequate for you, there is no need for additional configuration, but if not then the rest of this chapter describes how to create or change them. 

The most common change needed is a different set of servers to try. Many servers limit the users that can connect to them and you may have to search for one that will grant you access. The preselected servers in Snak are reasonably accessible but there is no guarantee that they are always available.

Connection Profiles
A profile contains a list of servers to connect to plus nickname, username, optional password and startup action.  

The best way is to have a profile for each of your favorite networks containing multiple servers instead of a separate profile per server. Just add your favorite servers on that particular network to the profile and Snak will try each server in turn until one grants you access. 

Select a profile in the list and press "Edit" or double click it to  edit.

 

A nickname (nick) is the name under which the other members of the channels will see you. The name can be anything, but most servers limit you to 9 characters from the English character set.

If you want to add servers, you can do that by pressing the Add button. If there is more than one server in the profile, the program will try each server until it finds one that will connect.

A startup action is one or more commands you want the program to perform automatically when you connect, like joining certain channels. In this picture, the channel beginner will be joined automatically when the connection is opened.

The startup action can be about 500 characters long but if that is too little then you can make an alias that contains all the desired functionality and use that instead. Please see the Scripting chapter for information on how to make aliases.

Server Selection
Profiles can specify multiple servers, which allows the program to try each server until it finds one that will let you in.

Almost all IRC servers are a part of a network as explained in the Introduction chapter of this manual and this is reflected in the server selection dialog.  To select a server, first select the network in the network list on the left and then choose the server in the server list.

If the network you want is not among those that Snak knows about you can add it by pressing the Add… button for the network list and enter the network name. Then press the Add… button for the server list and enter the server name and details.

This dialog comes up when you press the Add button in the edit profile dialog, and when you define a new profile.

You can also use this dialog to switch to a new server once you have a connection open. This is useful if you find that the server is too slow or having problems. To do this, press cmd-E and choose a server. When you select OK Snak will disconnect from the current server and attempt to connect to the one you chose.

If a server takes longer than 40 seconds to respond, or you need to specify a different port to use than 6667, please double click on the line in the server list to bring up the dialog to edit the server record for the particular server.

The servers and networks that Snak knows about are stored in the file "servers.ini" that is found in the scripts folder. Snak can use the server list that comes with the popular mIRC PC IRC client and you can always obtain a current server list by going to http://www.mirc.co.uk/servers.ini and downloading a new one. The file used by kind permission of the author of mIRC, Khaled Mardam-Bey and it is continually kept up to date by Tjerk Vonck.

Connecting to a Network
After completing the setup there are several ways that you can open the connection to the server. You can use the File/Open Connection menu or the Connnect button in the Connections panel to open a connection to a server.  

Once the connection is open then you can type commands like "/join beginner" to join a channel.

You can also use the Join dialog (cmd-J) to directly select the channel you want to join and immediately open a connection.

Snak will remember all the channel windows that were open the last time you ran the program, and once you connect to the network the program will automatically join those channels.

The Console Window
When the connection starts to open, a console window is shown. The console window will display the status of the connection in the top left corner.

There is one console window per network and it does not have to be open. It can be reopened by selecting the Console menu item in the windows menu.

If you have chosen to have the input field integrated, then the bottom part of the windows is the text field where you type text and commands.

Initially, the connection status will be "Not Connected".  When the connection attempt is started, the status will change to "Connecting", and when the program has established contact to the server and is negotiating for access, the status will be "Connected". After a successful negotiation the status will change to "Online" and you will see the logon and greeting message from the server flow into your console window.

You are now online with an IRC server and can join channels using the methods described previously, and in more details in the next chapter.

If the connection attempt stays in the "Connecting" phase for too long it may mean that the server is not responding, and the attempt should be aborted by pressing the Disconnect button in the Connections panel. 

If you have multiple servers in the profile you can make Snak step to the next one with the command /server +

The default timeout for connecting to a server is 40 seconds. This can be set individually for each server by editing the server record in the server list.